// 账单列表相关
import { createSlice } from '@reduxjs/toolkit'

const billStore = createSlice({
  name: 'bill',
  // 数据状态
  initialState: {
    billList: [],
  },
  reducers: {
    // 同步修改方法
    setBillList(state, action) {
      state.billList = action.payload
    },
  },
})

// 结构action函数
export const { setBillList } = billStore.actions

// 导出reducers
const billReducer = billStore.reducer

export default billReducer
